---
image: /generated/articles-docs-audio-muting.png
title: Muting Audio
sidebar_label: Muting Audio
id: muting
crumb: 'Audio'
---

import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
import {AvailableFrom} from '../../src/components/AvailableFrom';

You may pass in the [`muted`](/docs/html5-audio#muted) prop to [`<Audio>`](/docs/media/audio), [`<Video>`](/docs/media/video), [`<OffthreadVideo>`](/docs/offthreadvideo), [`<Html5Audio>`](/docs/html5-audio) and [`<Html5Video>`](/docs/html5-video) and even change it over time.

When [`muted`](/docs/html5-audio#muted) is true, audio will be omitted at that time. In the following example, we are muting the track between seconds 2 and 4.

```tsx twoslash {9}
import {AbsoluteFill, staticFile, useCurrentFrame, useVideoConfig} from 'remotion';
import {Html5Audio} from 'remotion';

export const MyComposition = () => {
  const frame = useCurrentFrame();
  const {fps} = useVideoConfig();

  return (
    <AbsoluteFill>
      <Html5Audio src={staticFile('audio.mp3')} muted={frame >= 2 * fps && frame <= 4 * fps} />
    </AbsoluteFill>
  );
};
```
